package com.example.designpattenexample.mixpatten.example1;

public class StrategyFactory {

    public static IDeduction getDeduction(StrategyMan deductionStrategy) {
        IDeduction strategyDeduction = null;
        try {
            strategyDeduction = (IDeduction) Class.forName(deductionStrategy.getValue()).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return strategyDeduction;
    }
}
